package com.lwm.controller;

import com.lwm.factory.SingletonBeanFactory;
import com.lwm.service.IAccountService;

/**
 * 测试是否单例
 *
 * @author liweimin
 * @date 2021/6/2 17:53
 * @since
 */
public class AccountNewController {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            new Thread(((IAccountService) SingletonBeanFactory.getBean("B"))::saveAccount).start();
        }
    }
}
